package com.ruoyi.basebill.mapper;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import com.ruoyi.basebill.domain.OmsSaleissuebill;
import com.ruoyi.basebill.domain.OmsSaleissuebillentry;
import org.apache.ibatis.annotations.Param;

/**
 * 销售出库单Mapper接口
 * 
 * @author ruoyi
 * @date 2023-02-15
 */
public interface OmsSaleissuebillMapper 
{
    /**
     * 查询销售出库单
     * 
     * @param id 销售出库单主键
     * @return 销售出库单
     */
    public OmsSaleissuebill selectOmsSaleissuebillById(Long id);


    public List<OmsSaleissuebill> selectOmsSaleissuebillByIds(@Param("list") HashSet<Long> ids);

    /**
     * 查询销售出库单列表
     * 
     * @param omsSaleissuebill 销售出库单
     * @return 销售出库单集合
     */
    public List<OmsSaleissuebill> selectOmsSaleissuebillList(OmsSaleissuebill omsSaleissuebill);


    public List<OmsSaleissuebill> selectOmsSaleissuebillDetailList(OmsSaleissuebill omsSaleissuebill);

    /**
     * 新增销售出库单
     * 
     * @param omsSaleissuebill 销售出库单
     * @return 结果
     */
    public int insertOmsSaleissuebill(OmsSaleissuebill omsSaleissuebill);

    /**
     * 修改销售出库单
     * 
     * @param omsSaleissuebill 销售出库单
     * @return 结果
     */
    public int updateOmsSaleissuebill(OmsSaleissuebill omsSaleissuebill);

    /**
     * 删除销售出库单
     * 
     * @param id 销售出库单主键
     * @return 结果
     */
    public int deleteOmsSaleissuebillById(Long id);

    /**
     * 批量删除销售出库单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsSaleissuebillByIds(Long[] ids);

    /**
     * 批量删除销售出库单明细
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsSaleissuebillentryByParentids(Long[] ids);
    
    /**
     * 批量新增销售出库单明细
     * 
     * @param omsSaleissuebillentryList 销售出库单明细列表
     * @return 结果
     */
    public int batchOmsSaleissuebillentry(List<OmsSaleissuebillentry> omsSaleissuebillentryList);
    

    /**
     * 通过销售出库单主键删除销售出库单明细信息
     * 
     * @param id 销售出库单ID
     * @return 结果
     */
    public int deleteOmsSaleissuebillentryByParentid(Long id);

    List<OmsSaleissuebill> selectSumBillNumberIsNull();

    public int updateSumBillNumberByIds(@Param("sumBillNumber") String sumBillNumber, @Param("ids")ArrayList<Long> ids);

    /**
     * 查询是否推送过EAS的销售出库单数据
     * @param isTrans
     * @return
     */
    public List<OmsSaleissuebill> selectPushEASSaleissuebillList(int isTrans);

}
